<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:app="http://schemas.android.com/apk/res-auto"
    xmlns:tools="http://schemas.android.com/tools"
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    android:layout_marginBottom="20dp"
    android:id="@+id/rootLayout"
    android:paddingLeft="20dp"
    android:paddingRight="20dp"
    android:background="?selectableItemBackground"
    android:orientation="vertical">

    <androidx.cardview.widget.CardView
        android:id="@+id/animeCardView"
        android:layout_width="80dp"
        android:layout_height="120dp"
        app:cardCornerRadius="4dp"
        app:cardElevation="0dp"
        app:layout_constraintStart_toStartOf="parent"
        app:layout_constraintTop_toTopOf="parent">

        <androidx.appcompat.widget.AppCompatImageView
            android:id="@+id/animeImage"
            android:layout_width="match_parent"
            android:layout_height="match_parent"
            android:scaleType="centerCrop" />
    </androidx.cardview.widget.CardView>

    <TextView
        android:id="@+id/animeTitle"
        android:layout_width="0dp"
        android:fontFamily="sans-serif"
        android:layout_height="wrap_content"
        android:layout_marginStart="20dp"
        android:ellipsize="end"
        android:maxLines="2"
        android:textStyle="bold"
        android:textColor="@color/anime_title"
        android:textSize="16sp"
        app:layout_constraintBottom_toTopOf="@+id/episodeNumber"
        app:layout_constraintEnd_toEndOf="parent"
        app:layout_constraintStart_toEndOf="@id/animeCardView"
        app:layout_constraintTop_toTopOf="parent"
        app:layout_constraintVertical_bias="0.4"
        app:layout_constraintVertical_chainStyle="packed"

        tools:text="One Piece" />

    <TextView
        android:id="@+id/episodeNumber"
        android:layout_width="0dp"
        android:fontFamily="sans-serif"
        android:layout_height="wrap_content"
        android:layout_marginStart="20dp"
        android:textStyle="bold"
        app:layout_constraintBottom_toTopOf="@+id/flowLayout"
        app:layout_constraintEnd_toEndOf="parent"
        app:layout_constraintHorizontal_bias="0.5"
        app:layout_constraintStart_toEndOf="@id/animeCardView"
        app:layout_constraintTop_toBottomOf="@+id/animeTitle"
        android:textColor="@color/recycler_episode_number"
        android:layout_marginTop="6dp"
        tools:text="Episode 8" />

    <org.apmem.tools.layouts.FlowLayout
        android:id="@+id/flowLayout"
        android:layout_width="0dp"
        android:layout_height="wrap_content"
        android:layout_marginStart="14dp"
        app:layout_constraintBottom_toBottomOf="parent"
        app:layout_constraintEnd_toEndOf="parent"
        app:layout_constraintStart_toEndOf="@id/animeCardView"
        app:layout_constraintTop_toBottomOf="@+id/episodeNumber"
        android:layout_marginTop="8dp" />
</androidx.constraintlayout.widget.ConstraintLayout>